<?php
/**
 * Pages_AdminController
 * 
 * @author
 * @version 
 */
class Pages_AdminController extends Zen_Controller_Admin {
	
	public function indexAction(){
		 $this->view->model=new Pages_Model_Tree();
	}
	
	public function treeAction(){
	   $file=ROOT_PATH."/site/settings/settings.ini";
       $values=new Zend_Config_Ini($file,APPLICATION_ENV);
       if($values->tiny)
       {
       $this->view->tiny=true;
       Zen_Script::add('/cms/res/tiny_mce/jquery.tinymce.js');
       Zen_Script::add('/cms/res/tiny_mce/tiny_mce.js');
       }else{
       $this->view->tiny=false;
       }
		$this->_helper->jstree(new Pages_Model_Tree(),$this->_getAllParams());
	   
	}

}